Returns the error message string from the underlying data source. Not available at design time.
Syntax
object.ErrorText
The ErrorText property syntax has these parts:
Part | Description |
object | An object expression that evaluates to an object in the Applies To list. |
Remarks
When a database error occurs as a result of user interaction with the grid, such as when the user enters text into a numeric field and then attempts to update the current record by moving to another row, the grid's Error event will fire. However, the error code passed to the event handler in the DataError parameter may not identify the specific error that occurred, or may even differ across operating environments. For these reasons, the ErrorText property is provided so that your application can parse the actual error message to determine the nature of the error.
Note The ErrorText property is only valid within a DataGrid control's Error event handler. A trappable error will occur if you attempt to access it in any other context.